from django.conf.urls.defaults import patterns, include, url
import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
#	(r'^$connections/(?P<source>\d+)/$', 'connections'),
    # Examples:
    # url(r'^$', 'MaraudersMap.views.home', name='home'),
    # url(r'^MaraudersMap/', include('MaraudersMap.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^connections/(?P<source>\d+)', 'MMap.views.connectionList'),
    url(r'^delete/(?P<target>\w+)', 'MMap.views.delete'),
    url(r'^connections/','MMap.views.connectionIndex'),
    url(r'^login/', 'MMap.views.login'),
    url(r'^logout/', 'MMap.views.logout'),
    url(r'^register/', 'MMap.views.register'),
    url(r'^everybody/','MMap.views.userIndex'),
    url(r'^add', 'MMap.views.addUser'),
    url(r'^map/(?P<target>\w+)', 'MMap.views.centerMap'),
    url(r'^chat/(?P<target>\w+)', 'MMap.views.chat'),
    url(r'^sendMessage/(?P<target>\w+)', 'MMap.views.saveMessage'),
    url(r'^newMessages/(?P<target>\w+)', 'MMap.views.newMessages'),
    url(r'^inbox/', 'MMap.views.inbox'),
    url(r'^$','MMap.views.showMap'),
    url(r'^mapRefresh/', 'MMap.views.mapRefresh'),
    url(r'^friends/', 'MMap.views.friends'), 	
    (r'^media/(?P<path>.*)$', 'django.views.static.serve',
                 {'document_root': settings.MEDIA_ROOT}),

    #url(r'^(?P<source>\d+)/connections/$', 'MMap.views.connections'),
)
